package cn.sofwin.day0120.homework.Bank;

public class Account {
    double money = 0;

    /**
     * @inMoney 存款
     */
    public void inMoney(double money){
        this.money += money;
        showMoney();
    }

    /**
     * @outMoney 取款
     */
    public void outMoney(double money){
        if (this.money < money){
            System.out.println("余额不足");
            showMoney();
            return;
        }
        this.money -= money;
        showMoney();
    }

    public void showMoney(){
        System.out.println("***当前余额为：" + money + "元***");
    }
}
